<?php 
//Recebe a seção gravada anteriormente;
$phpObj = $_SESSION['retorno'];
//Conta quantos resultados foram encontrados para fazer o loop e exibi-los.
$count = count($phpObj['query']['results']['results']);
?>
	<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br" xml:lang="pt-br">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		
		<style type="text/css">
			table	{
			border-collapse:collapse;
			border:solid 2px #999999;
			width:600px;
			margin: 0 auto;
			}		
			tr td, tr th	{
					border:dotted 1px #999999;
					}		
			.cor{background:red;}
			.cor_{background:gold;}
		</style>
		
		<script type="text/javascript">
				$(function(){
					$('table#resultado tbody tr:even').css('background','#FFFF99');
				});
		</script>
	</head>
	<body>
        <div>
        <input type="hidden" name="" value=<?php ?> id="" >
        	<form action="" method="post">		
						<table id="resultado" border="1">						
			<?php 
							echo "	<thead>
									<tr>
										<th>Resutado da busca</th>
										<th>Selecionar Todos <input type=\"checkbox\" id=\"selecionaTodos\" name=\"selecionaTodos\"  /></th>
									</tr>
									</thead>
								 " .
									"<tbody>";
							for ($i = 0; $i < $count; $i++){
								echo "	<tr>
									        <td><img src=".$phpObj['query']['results']['results'][$i]['profile_image_url']."></td>".
									    	"<td>@".$phpObj['query']['results']['results'][$i]['from_user']."</td>
									    	
									    </tr>                                                                   
									    <tr>
									     	<td><b>Postado em:</b> </td>".
									     	"<td>".$phpObj['query']['results']['results'][$i]['created_at']."</td>	     	
										</tr>
										<tr>						
											<td><b>Para: </b></td>
											<td>".$phpObj['query']['results']['results'][$i]['to_user']."</td>
										</tr>
										<tr>	
										 	<td><b>Twitte:</b></td>".
										 	"<td>".$phpObj['query']['results']['results'][$i]['text']."</td>			 	
										</tr>
										<tr>
											<td><b>Salvar dados? </b></td> 	
										 	<td><input type=\"checkbox\" name=\"checkSalva\" id=\"checkSalva\" /></td>			  
									 	</tr>";
							}
							echo "</tbody>";
			?>
						</table>
						<input type="submit" id="" name="" value="Salvar Seleção" />
			</form>
        </div>
        </body>
   </html>     